home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HamCall (April 1991)
/
HAMCALL CD-ROM (Buckmaster)(April 1991).BIN
/
prgming
/
ctutor
/
mortypes.c
< prev
next >
Wrap
Text File
|
1990-10-14
|
776b
|
28 lines
/* Chapter 4 - Program 2 */
/* The purpose of this file is to introduce additional data types */
main()
{
int a,b,c; /* -32768 to 32767 with no decimal point */
char x,y,z; /* -128 to 127 with no decimal point */
float num,toy,thing; /* 3.4E-38 to 3.4E+38 with decimal point */
a = b = c = -27;
x = y = z = 'A';
num = toy = thing = 3.6792;
a = y; /* a is now 65 (character A) */
x = b; /* x is now -27 */
num = b; /* num will now be -27.00 */
a = toy; /* a will now be 3 */
}
/* Result of execution
(No output from this program.)
*/